import  requests
import json
req = requests.session()
import urllib3
urllib3.disable_warnings()


url = 'https://newdev.innisfree.cn/api/create/fav-stores'
# data = {'shopIdItems': [{'shopId': 'CN9900993'}]}
data = {"shopIdItems":[{"shopId":"CN9900993"}]}
header = {
  "Content-Type": "application/x-www-form-urlencoded"
  }

# header : {
#   "Content-Type": "application/x-www-form-urlencoded"
#   }

# header = {'Content-Type': 'application/json;charset=utf-8'}
# data = "shopIdItems=[{'shopId':'CN9900993'}]"

# re = req.post_request(url, json.dumps(datas['data']), datas['header'])



# req.post(url="https://newdev.innisfree.cn//api/user/general/login?account=18850369373&password=x5HMgFqOWTp/s0sSE3QagQ&channel=W")
response = req.post(url=url, data=data, headers=header,verify=False)
# response = req.post(url=url, data=json.dumps(data), headers=header)

print (response.json())
# print(response.text)






# {
#     'conditions':'{"city_code":"440100","hid":-1,"capacity":-1,"type_code":-1,"tag":-1,"keyword":-1,"key":-1,"lat":"0","lng":"0","center_name":-1,"has_package":-1,"has_special":0,"has_conference":1,"order":-1,"dur":-1,"bud":-1,"page":1,"num":"","cap_num":"","qt":0}'
# }
# https://www.cnblogs.com/xiaohuhu/p/9797900.html

# ---
# moduleName : 门店
# caseId : 门店_收藏门店_0001
# intention : 验证：输入正确的门店编号，收藏成功
# method : POST
# header :
#   {
#   "Content-Type": "application/x-www-form-urlencoded"
#   }
# url : /api/create/fav-stores
# data :
#   shopIdItems : [{"shopId":"CN9900993"}]
# response :
#   $.msg : success
#   $.code : 1000
